#pragma once

#include "stdafx.h"
#include "com_core_def.h"
#include "dbg_log_output.h"
#include "FFByteStreamHandler.h"

VOID DllAddRef();
VOID DllRelease();

class CActivationFactory : public IActivationFactory
{
	ULONG RefCount = 1;
public:
	CActivationFactory()
	{
		DllAddRef();
	}
	~CActivationFactory()
	{
		DllRelease();
	}
public:
	IFACEMETHODIMP QueryInterface(REFIID riid,void** ppvObject);
	IFACEMETHODIMP_(ULONG) AddRef();
	IFACEMETHODIMP_(ULONG) Release();
public:
	IFACEMETHODIMP GetIids(ULONG* iidCount,IID** iids);
	IFACEMETHODIMP GetRuntimeClassName(HSTRING* className);
	IFACEMETHODIMP GetTrustLevel(TrustLevel* trustLevel);
public:
	STDMETHODIMP ActivateInstance(IInspectable** instance);
};